- case @style
- when 'qanda'
  .qlist id=@id class=['qanda',role]
    - if title?
      .title=title
    ol
      - items.each do |questions, answer|
        li
          - [*questions].each do |question|
            p: em=question.text
          - unless answer.nil?
            - if answer.text?
              p=answer.text
            - if answer.blocks?
              =answer.content
- when 'horizontal'
  .hdlist id=@id class=role
    - if title?
      .title=title
    table
      - if (attr? :labelwidth) || (attr? :itemwidth)
        colgroup
          col style=((attr? :labelwidth) ? %(width:#{(attr :labelwidth).chomp '%'}%;) : nil)
          col style=((attr? :itemwidth) ? %(width:#{(attr :itemwidth).chomp '%'}%;) : nil)
      - items.each do |terms, dd|
        tr
          td class=['hdlist1',('strong' if option? 'strong')]
            - terms = [*terms]
            - last_term = terms.last
            - terms.each do |dt|
              =dt.text
              - if dt != last_term
                br
          td.hdlist2
            - unless dd.nil?
              - if dd.text?
                p=dd.text
              - if dd.blocks?
                =dd.content
- else
  .dlist id=@id class=[@style,role]
    - if title?
      .title=title
    dl
      - items.each do |terms, dd|
        - [*terms].each do |dt|
          dt class=('hdlist1' unless @style) =dt.text
        - unless dd.nil?
          dd
            - if dd.text?
              p=dd.text
            - if dd.blocks?
              =dd.content
